<!DOCTYPE html>
<%@page import="com.tdcy.biz.wxmgt.WxMgtConstant"%>
<%@page import="com.tdcy.sys.util.ParamUtils"%>
<%@page import="com.tdcy.framework.util.SessionUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="biztag"%>

<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>配置管理中心</title>

	<meta name="viewport" content="widtd=device-widtd, initial-scale=1.0" />
	<jsp:include page="../../hcommon.jsp"></jsp:include>
</head>
<script type="text/javascript">
	var curSearchInfo;
	var url;
	var formValid = null;
	
	$(function() {
		formValid = AppKit.formTipValidate("userForm");
	});
	
	function submitInfo() {
		var flag = formValid.check();
		if(!flag){
			return;
		}
		
		var info = $("#userForm").serializeObject();
		
		var url = "${path}/wxmgt/saveWxAcct";
		AppKit.postJSON(url, info, function(json){
			if (!AppKit.checkJSONResult(json)) {
	   			return;
	   		}
	   		AppKit.showTipMessage(json.message);
		});
	}
</script>
<body class="white-bg" style="margin-left: 5px;margin-top: 5px;" >
	<form id="userForm" method="post" class="form-horizontal">
	  <table class="table table-bordered  table-condensed dataTables-example dataTable no-footer" style="width: 60%;">
	    <tbody>
	     <tr >
	        <td class="width-100 active text-left" colspan="6">
	          <label style="font-size: 15px;">
	            微信账号信息</label></td>
	      </tr>
	      <tr>
	        <td class="width-15 active text-right">
	          <label>
	            <font color="red">*</font>App Id:</label></td>
	        <td class="width-35">
	          <input name="appid" class="form-control " datatype="*" nullmsg="不能为空"  value="<%=ParamUtils.getParamValue(WxMgtConstant.WXPARAM_APPID) %>"/>
	          <div class="Validform_checktip"></div>
	        </td>
	      </tr>
	      <tr>
	        <td class="width-15 active text-right">
	          <label>
	            <font color="red">*</font>App Secret:</label></td>
	        <td class="width-35">
	          <input name="appsecret" class="form-control " datatype="*" nullmsg="不能为空"   value="<%=ParamUtils.getParamValue(WxMgtConstant.WXPARAM_APPSECRET) %>"/>
	          <div class="Validform_checktip"></div>
	        </td>
	      </tr>
	       <tr>
	        <td class="width-15 active text-right">
	          <label>
	            <font color="red">*</font>Token:</label></td>
	        <td class="width-35">
	          <input name="token" class="form-control " datatype="*" nullmsg="不能为空"   value="<%=ParamUtils.getParamValue(WxMgtConstant.WXPARAM_TOKEN) %>"/>
	          <div class="Validform_checktip"></div>
	        </td>
	      </tr>
	       <tr>
	        <td class="width-15 active text-right">
	          <label>
	           AES Key:</label>
	         </td>
	        <td class="width-35">
	          <input name="aesKey" class="form-control "   value="<%=ParamUtils.getParamValue(WxMgtConstant.WXPARAM_AESKEY) %>"/>
	        </td>
	      </tr>
	    </tbody>
	  </table>
	</form>
	
	<div style="text-align: center;width: 60%;" >
	     <button class="btn btn-sm btn-primary" onclick="submitInfo()"><i class="fa fa-plus"></i>提交</button>
	</div>
</body>
</html>